package com.yadang.controller;

import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Properties;
import java.util.UUID;

/**
 * @author: 亚当
 * @date: 2023年03月05日 16:26
 * @package: com.yadang.controller
 * @Description: TODO
 */
@RestController
@RequestMapping("/eduService/subject")
@CrossOrigin
public class MyController {
    @GetMapping("addSubject/{name}")
    public String  addSubject(@PathVariable String  name){
        System.out.println(name);
        UUID uuid = UUID.randomUUID();
        String s = uuid.toString().replaceAll("-", "");
        return name+s;
    }

    public static void main(String[] args) {
        Properties props = System.getProperties();
        System.setProperty("yourName","王建辉");
        String yourName = props.getProperty("yourName");
        System.out.println(yourName);
        System.out.println("========================");
        props.list(System.out);
    }
}
